package com.czz.sms.controller;

import com.czz.common.vo.R;
import com.czz.sms.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName: SmsController
 * @Author Czz
 * @Date 2020/2/20
 * @Time 10:36
 **/
@RestController
@RequestMapping(value = "/user")
public class SmsController {

    @Autowired
    SmsService smsService;

    /**
    * @Description 发送用户短信验证码
    * @Param [phone]
    * @Return com.czz.common.vo.R
    * @Author Czz
    * @Date 2020/2/20
    * @Time 10:50
    **/
    @PostMapping(value = "/{phone}/{code}")
    public R getUserSms(@PathVariable String phone,@PathVariable String code){
        smsService.getUserSms(phone,code);
        return R.ok();
    }
}
